﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IPCByMessages
{
    /// <summary>
    /// DataReceivedEventArgs contains information about data received by channel
    /// </summary>
    public class DataEventArgs : EventArgs
    {
        /// <summary>
        /// Received data
        /// </summary>
        public byte[] Data { get; private set; }

        public DataEventArgs()
            : base()
        { }

        /// <summary>
        /// Creates new instance of DataReceivedEventArgs
        /// </summary>
        /// <param name="data">Received data</param>
        public DataEventArgs(params byte [] data)
            : this()
        {
            Data = data;
        }
    }

    /// <summary>
    /// DataReceivedEventHandler describes data received event handler
    /// </summary>
    /// <param name="sender">Sender of the event</param>
    /// <param name="e">Event data</param>
    public delegate void DataEventHandler(object sender, DataEventArgs e);
}
